package com.example.springbootweb.zk;

import java.util.concurrent.CountDownLatch;

/**
 * @Description: TestCountDownLatch
 * @Author: mingtian
 * @CreateDate: 2019/9/23 14:16
 * @Version: 1.0
 */
public class TestCountDownLatch {
    public static void main(String[] args) throws InterruptedException {
        // 计数器
        CountDownLatch countDownLatch = new CountDownLatch(3);
        System.out.println("countDown Before：" + countDownLatch.getCount());
        countDownLatch.countDown();
        System.out.println("countDown After:" + countDownLatch.getCount());
    }
}